package com.woniuxy.service.Impl;

import com.woniuxy.dao.UserDao;
import com.woniuxy.entity.User;
import com.woniuxy.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public boolean addUser(User user) {
        return userDao.addUser(user)>0;
    }

    @Override
    public boolean delUser(int id) {
        return userDao.delUser(id)>0;
    }

    @Override
    public boolean update(int id, String password) {
        return userDao.update(id, password)>0;
    }


}
